const session = require("express-session")

module.exports = (req, res) => {
    //  删除session
    req.session.destory(function() {
        //  删除cookie
        res.clearCookie('connect.sid');
        //  退出登录后跳转回登陆页面
        res.redirect('/admin/login');
    });
}